
</head>
<?php
include('main.php');

if ($this->session->userdata('user_login')) {
    ?>

    <?php
    echo '<span style="color:red;">' . validation_errors() . '</span>';
    ?>
    <?php
    if ($user->num_rows() > 0) {
        foreach ($user->result() as $row) {
            ?>
            <table class="table table-bordered table-striped">
                <tr>
                    <td rowspan="10">Photo here</td>
                    <td><label class="contactform"><strong>First Name:</strong></label></td>
                    <td> <?php echo $row->firstName; ?></td>
                </tr>
                <tr>
                    <td><label class="contactform"><strong>Last Name:</strong></label></td>
                    <td><?php echo $row->lastName; ?></td>
                </tr>
                <tr>
                    <td><label class="contactform"><strong>Username:</strong></label></td>
                    <td><?php echo $row->user_name; ?></td>
                </tr>
                <tr>
                    <td><label class="contactform"><strong>Email:</strong></label></td>
                    <td><?php echo $row->email; ?></td>
                </tr>
                <tr>
                    <td><label class="contactform"><strong>User type:</strong></label></td>
                    <td><?php echo $row->role_name; ?></td>
                </tr>
                <tr>
                    <td><label class="contactform"><strong>Gender:</strong></label></td>
                    <td><?php echo $row->user_gender; ?></td>
                </tr>
                <tr>
                    <td><label class="contactform"><strong>Date Of Birth:</strong></label></td>
                    <td><?php echo $row->dob; ?></td>
                </tr>
                <tr>
                    <td><label class="contactform"><strong>Nationality:</strong></label></td>
                    <td><?php echo $row->user_nationality; ?></td>
                </tr>
                <tr>
                    <td><label class="contactform"><strong>Address:</strong></label></td>
                    <td><?php echo $row->user_add; ?></td>
                </tr>

                <tr>
                    <td>

                        <?php
                        echo anchor('login/update', 'Update', 'class="btn btn-primary"');
                    }
                }
                ?>
            </td> 
            <td>
			<?php
				echo anchor('login/remove_user', 'Remove Account', 'onclick="return confirm(\"Are you sure to remove?\")" class="btn btn-danger"');
			?>
			<!--a onclick="return:javascript confirm('Are you sure to remove?');" href="login/remove_user" class="btn btn-danger">Remove Account</a-->
			</td>
        </tr>

    </table>

    <?php
} else {
    redirect(base_url());
}
?>
      